package com.dorm.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
public class Building extends BaseEntity {
    private Long id;
    private String buildingName;
    private Integer floors;
    private String description;
    
    @JsonManagedReference
    private List<Room> rooms = new ArrayList<>();
    
    // 统计字段
    private Integer totalRooms;
    private Integer checkedRooms;
    private Double averageScore;
    private String lastCheckTime;
    private Double occupancyRate;
} 